3.556 \(\int \frac {\sec ^4(c+d x)}{(a+b \tan (c+d x))^2} \, dx\)

Optimal. Leaf size=61 \[ -\frac {a^2+b^2}{b^3 d (a+b \tan (c+d x))}-\frac {2 a \log (a+b \tan (c+d x))}{b^3 d}+\frac {\tan (c+d x)}{b^2 d} \]

[Out]

-2*a*ln(a+b*tan(d*x+c))/b^3/d+tan(d*x+c)/b^2/d+(-a^2-b^2)/b^3/d/(a+b*tan(d*x+c))

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3506, 697} \[ -\frac {a^2+b^2}{b^3 d (a+b \tan (c+d x))}-\frac {2 a \log (a+b \tan (c+d x))}{b^3 d}+\frac {\tan (c+d x)}{b^2 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4/(a + b*Tan[c + d*x])^2,x]

[Out]

(-2*a*Log[a + b*Tan[c + d*x]])/(b^3*d) + Tan[c + d*x]/(b^2*d) - (a^2 + b^2)/(b^3*d*(a + b*Tan[c + d*x]))

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \frac {\sec ^4(c+d x)}{(a+b \tan (c+d x))^2} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1+\frac {x^2}{b^2}}{(a+x)^2} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {1}{b^2}+\frac {a^2+b^2}{b^2 (a+x)^2}-\frac {2 a}{b^2 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=-\frac {2 a \log (a+b \tan (c+d x))}{b^3 d}+\frac {\tan (c+d x)}{b^2 d}-\frac {a^2+b^2}{b^3 d (a+b \tan (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 51, normalized size = 0.84 \[ \frac {-\frac {a^2+b^2}{a+b \tan (c+d x)}-2 a \log (a+b \tan (c+d x))+b \tan (c+d x)}{b^3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4/(a + b*Tan[c + d*x])^2,x]

[Out]

(-2*a*Log[a + b*Tan[c + d*x]] + b*Tan[c + d*x] - (a^2 + b^2)/(a + b*Tan[c + d*x]))/(b^3*d)

________________________________________________________________________________________

fricas [B]  time = 0.59, size = 178, normalized size = 2.92 \[ -\frac {2 \, b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - b^{2} + {\left (a^{2} \cos \left (d x + c\right )^{2} + a b \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - {\left (a^{2} \cos \left (d x + c\right )^{2} + a b \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right )}{a b^{3} d \cos \left (d x + c\right )^{2} + b^{4} d \cos \left (d x + c\right ) \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+b*tan(d*x+c))^2,x, algorithm="fricas")

[Out]

-(2*b^2*cos(d*x + c)^2 - 2*a*b*cos(d*x + c)*sin(d*x + c) - b^2 + (a^2*cos(d*x + c)^2 + a*b*cos(d*x + c)*sin(d*
x + c))*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2) - (a^2*cos(d*x + c)^2 + a*b*co
s(d*x + c)*sin(d*x + c))*log(cos(d*x + c)^2))/(a*b^3*d*cos(d*x + c)^2 + b^4*d*cos(d*x + c)*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 5.25, size = 71, normalized size = 1.16 \[ -\frac {\frac {2 \, a \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}} - \frac {\tan \left (d x + c\right )}{b^{2}} - \frac {2 \, a b \tan \left (d x + c\right ) + a^{2} - b^{2}}{{\left (b \tan \left (d x + c\right ) + a\right )} b^{3}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+b*tan(d*x+c))^2,x, algorithm="giac")

[Out]

-(2*a*log(abs(b*tan(d*x + c) + a))/b^3 - tan(d*x + c)/b^2 - (2*a*b*tan(d*x + c) + a^2 - b^2)/((b*tan(d*x + c)
+ a)*b^3))/d

________________________________________________________________________________________

maple [A]  time = 0.48, size = 78, normalized size = 1.28 \[ \frac {\tan \left (d x +c \right )}{b^{2} d}-\frac {2 a \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3} d}-\frac {a^{2}}{d \,b^{3} \left (a +b \tan \left (d x +c \right )\right )}-\frac {1}{b d \left (a +b \tan \left (d x +c \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4/(a+b*tan(d*x+c))^2,x)

[Out]

tan(d*x+c)/b^2/d-2*a*ln(a+b*tan(d*x+c))/b^3/d-1/d/b^3/(a+b*tan(d*x+c))*a^2-1/b/d/(a+b*tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 60, normalized size = 0.98 \[ -\frac {\frac {a^{2} + b^{2}}{b^{4} \tan \left (d x + c\right ) + a b^{3}} + \frac {2 \, a \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{3}} - \frac {\tan \left (d x + c\right )}{b^{2}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+b*tan(d*x+c))^2,x, algorithm="maxima")

[Out]

-((a^2 + b^2)/(b^4*tan(d*x + c) + a*b^3) + 2*a*log(b*tan(d*x + c) + a)/b^3 - tan(d*x + c)/b^2)/d

________________________________________________________________________________________

mupad [B]  time = 3.72, size = 67, normalized size = 1.10 \[ \frac {\mathrm {tan}\left (c+d\,x\right )}{b^2\,d}-\frac {a^2+b^2}{b\,d\,\left (\mathrm {tan}\left (c+d\,x\right )\,b^3+a\,b^2\right )}-\frac {2\,a\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}{b^3\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^4*(a + b*tan(c + d*x))^2),x)

[Out]

tan(c + d*x)/(b^2*d) - (a^2 + b^2)/(b*d*(a*b^2 + b^3*tan(c + d*x))) - (2*a*log(a + b*tan(c + d*x)))/(b^3*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{4}{\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4/(a+b*tan(d*x+c))**2,x)

[Out]

Integral(sec(c + d*x)**4/(a + b*tan(c + d*x))**2, x)

________________________________________________________________________________________